package com.fdb.efp.nls.service.impl.psd.apply.bean;

import com.fdb.basic.framework.core.exception.OcmSystemException;
import com.fdb.efp.cus.service.facade.CusIndivService;
import com.fdb.efp.cus.service.vo.CusIndivVO;
import com.fdb.efp.nls.service.vo.CfcaSignInfoVO;
import com.fdb.efp.nls.service.facade.CfcaSignInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 需求编号:2019D08--
 * 问题编号:
 * 开发人员: caoxin
 * 创建日期:2019/10/15
 * 功能描述:
 * 修改日期:2019/10/15
 * 修改描述:
 */
public class SignContractBean {
    // 日志信息
    private static Logger logger = LoggerFactory.getLogger(SignContractBean.class);
    // 客户信息
    private CusIndivVO cusIndivVO;
    // cfca信息
    private CfcaSignInfoVO cfcaSignInfoVO;
    // 真实文件路径到表
    private String filePath;

    public void setCusIndivVO(CusIndivVO cusIndivVO) {
        this.cusIndivVO = cusIndivVO;
    }

    public void setCfcaSignInfoVO(CfcaSignInfoVO cfcaSignInfoVO) {
        this.cfcaSignInfoVO = cfcaSignInfoVO;
    }

    public CusIndivVO getCusIndivVO(CusIndivService cusIndivService, CusIndivVO selectCusIndivVO) throws OcmSystemException {
        if (cusIndivVO != null){
            return cusIndivVO;
        }else {
            try {
                cusIndivVO = cusIndivService.queryByPk(selectCusIndivVO);
            }catch (Exception e){
                logger.error("汇商贷【合同签订服务】查询客户信息失败!!!");
                throw new OcmSystemException("汇商贷【合同签订服务】查询客户信息失败!!!");
            }
            return cusIndivVO;
        }
    }

    public CfcaSignInfoVO getCfcaSignInfoVO(CfcaSignInfoService cfcaSignInfoService, CfcaSignInfoVO selectCfcaSignInfoVO) throws OcmSystemException {
        if (cfcaSignInfoVO != null){
            return cfcaSignInfoVO;
        }else {
            try {
                cfcaSignInfoVO = cfcaSignInfoService.queryByPk(selectCfcaSignInfoVO);
            }catch (Exception e){
                logger.error("汇商贷【合同签订服务】查询cfca签署信息失败!!!");
                throw new OcmSystemException("汇商贷【合同签订服务】查询cfca签署信息失败!!!");
            }
            return cfcaSignInfoVO;
        }
    }

    public CusIndivVO getCusIndivVO() {
        return cusIndivVO;
    }

    public CfcaSignInfoVO getCfcaSignInfoVO() {
        return cfcaSignInfoVO;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
}
